Defense (or defence) has several uses in the sphere of military application.
Personal defense implies measures taken by individual soldiers in protecting themselves whether by use of protective materials such as armor, or field construction of trenches or a bunker, or by using weapons that prevent the enemy approaching them to initiate close combat. In close combat where blade weapons are used, defense refers to a specific armed fighting technique.
When applied to military units, defense implies use of defensive tactics that seek to negate enemy offensive tactics.
A defensive military doctrine implies operation of larger military forces from a largely defensive posture, which at the operational warfare scale assumes the form of defense in depth, and at strategic scale encompasses a large area of operations such as the Maginot Line by large parts of the French Army before World War II.
In military operations planning, a defensive strategy is the policy of preventing an attack, or minimizing the damage of an attack, by the forces assuming defense in strategic depth for preventing an enemy from conquering territory.
Defense is also a euphemism for war, used by governments to reflect their non-aggressive posture in their region which does not carry the negative connotation of war, such as Ministry or Department of Defense.
Within the scope of a national defense policy, defense is used to include most military issues.
Military science seeks to integrate all the meanings of defense into a coherent whole that seeks to understand and develop applied uses for all of the above meanings within a single national defense management structure.
Although defense of territory, territorial waters and national airspace is one of the functions of the governments of sovereign states in the modern world, Hans-Hermann Hoppe, Murray Rothbard, Morris and Linda Tannehill, and other anarcho-capitalist writers have opined that it could be more efficiently provided by private vendors.
Historically, it was generally true that defenders had an advantage over attackers. Battles commonly focused on sieges of important cities, allowing defenders to strengthen their position. They had the ability to make preparations for the battle to protect themselves from the enemy while making the enemy vulnerable, e.g. preparing positions such as trenches and fortifications or in more recent times laying obstacles such as land mines and tank traps. However, in encounters larger than the small scale, the attacker may often have the advantage, since they get to choose the time and place of battle. An attacker may concentrate their entire force on a small part of the defended area, while the defender is forced to spread their forces over the possible area of attack.
In the modern era, the defenders' advantage has been gradually reduced, due to factors like increased mobility of modern forces, better communication technologies, and increased protection of troops and equipment.